/*
 * MMATimeCubeList.java
 *
 * Created on November 26, 2004, 6:29 PM
 */

package edu.temple.GUS.MMA.DataTypes;

import java.util.ArrayList;
/**
 *
 * @author  jeffleon
 */
public class MMATimeCubeList {
    
    private ArrayList list;
    
    /** Creates a new instance of MMATimeCubeList */
    public MMATimeCubeList() { list = new ArrayList(); }
    
    /* Appends the specified MMATimeCube to the end of the list. */
    /* Return true if successful otherwise false */
    public boolean add(MMATimeCube cube) {return list.add(cube);}
    
    /* Inserts a MMATimeCube at the specified position in this list. */
    public void add(int index, MMATimeCube cube) throws IndexOutOfBoundsException {list.add(index, cube);}
    
    /* Removes all of the cubes from this list. */
    public void clear() {list.clear();}
    
    /* Returns a MMATimeCube at the specified position in this list. */
    public MMATimeCube get(int index) { return (MMATimeCube)list.get(index);}
     
    /* Tests if this list has no element. */
    public boolean isEmpty() { return list.isEmpty();}
     
    /* Removes an element at the specified position in this list. */
    public MMATimeCube remove(int index) { return (MMATimeCube)list.remove(index);}
    
    /* Returns the number of elements in this list. */
    public int size() { return list.size();}
}
